package com.sbillings.messenger.hub.mocks;

import com.sbillings.messenger.hub.Message;
import com.sbillings.messenger.hub.MessagePublisher;
import com.sbillings.messenger.hub.Subscriber;

/**
 * A mock MessagePublisher, for unit testing.
 * A MessagePublisher is passed to the MessageGateway during construction. Each time the MessageGateway
 * receives the ingredients for a message (via, say, a servlet), it constructs a Message object
 * and passes it to the MessagePublisher.
 * @author Steve
 *
 */

public class MockPublisher implements MessagePublisher {
	
	public void publish(Message msg) {
		System.out.println("Publishing " + msg.toString());
	}
	
	public void setSubscriber(Subscriber subscriber) {
	}

}
